<template>
  <div class="app-container">
    <div class="warp_box">
      <div class="left">
        <div class="header">
          <span class="list"
          >评分列表
            <el-tooltip
              class="item"
              effect="dark"
              content="绿色标题表示启用状态,红色标题表示禁用状态"
              placement="bottom-start"
            >
              <span><i class="el-icon-question"/></span>
            </el-tooltip>
          </span>
          <span class="jia" @click="dialogVisibless = true"
          ><i class="el-icon-plus"
          /></span>
        </div>
        <!-- 新增评分 -->
        <el-dialog title="新增评分" :visible.sync="dialogVisibless" width="600px">
          <el-form
            ref="ruleForm"
            :model="ruleForm"
            :rules="rules"
            label-width="110px"
          >
            <el-form-item label="评分名称：" prop="scoreName">
              <el-input v-model="ruleForm.scoreName" class="el-inputer"/>
            </el-form-item>
            <el-form-item label="类型：" prop="type">
              <el-input v-model="ruleForm.type" class="el-inputer"/>
            </el-form-item>
            <el-form-item label="排序：" prop="sortNum">
              <el-input v-model="ruleForm.sortNum" class="el-inputer1"/>
            </el-form-item>
            <el-form-item label="分类：" prop="scoreType">
              <el-select
                v-model="ruleForm.scoreType"
                class="el-inputer"
                placeholder="请选择分类："
              >
                <el-option label="重症相关" value="重症相关"/>
                <el-option label="儿科相关" value="儿科相关"/>
                <el-option label="麻醉相关" value="麻醉相关"/>
              </el-select>
            </el-form-item>
            <el-form-item label="描述：" prop="description">
              <el-input
                v-model="ruleForm.description"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="图例：" prop="legend">
              <el-input
                v-model="ruleForm.legend"
                type="textarea"
                :rows="3"
                placeholder="请输入"
                class="el-inputer"
              />
            </el-form-item>
            <el-form-item label="评分规则描述：" prop="scoreRule">
              <el-input
                v-model="ruleForm.scoreRule"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="评估时机描述：" prop="scoreOpportunity">
              <el-input
                v-model="ruleForm.scoreOpportunity"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="录入护理措施：" prop="showNursing">
              <el-switch
                v-model="ruleForm.showNursing"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="护理措施：" prop="nursingStep">
              <el-input
                v-model="ruleForm.nursingStep"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="录入其他措施：" prop="showOtherStep">
              <el-switch
                v-model="ruleForm.showOtherStep"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="录入签名：" prop="showSignature">
              <el-switch
                v-model="ruleForm.showSignature"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="智能评分：" prop="showSmartScore">
              <el-switch
                v-model="ruleForm.showSmartScore"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="同步护理单：" prop="synReport">
              <el-switch
                v-model="ruleForm.synReport"
                inactive-text="否"
                active-text="是"
                class="switch-btn"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="关联护理单：" prop="reportType">
              <el-input
                v-model="ruleForm.reportType"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="护理单编码：" prop="reportCode">
              <el-input
                v-model="ruleForm.reportCode"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="同步评估单：" prop="synAssessment">
              <el-switch
                v-model="ruleForm.synAssessment"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="关联评估单：" prop="assessmentType">
              <el-input
                v-model="ruleForm.assessmentType"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item label="评估单编码：" prop="assessmentCode">
              <el-input
                v-model="ruleForm.assessmentCode"
                class="el-inputer"
                type="textarea"
                :rows="3"
                placeholder="请输入"
              />
            </el-form-item>
            <el-form-item
              label="同步至护理记录："
              prop="synNursing"
              label-width="124px"
            >
              <el-switch
                v-model="ruleForm.synNursing"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="是否统计：" prop="hasStatistics">
              <el-switch
                v-model="ruleForm.hasStatistics"
                class="switch-btn"
                inactive-text="否"
                active-text="是"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="统计格式日期：" prop="dateType">
              <el-input v-model="ruleForm.dateType" class="el-inputer"
              >YYYY-MM-DD HH:mm:ss
              </el-input
              >
            </el-form-item>
            <el-form-item label="状态：" prop="status">
              <el-switch
                v-model="ruleForm.status"
                class="switch-btn"
                inactive-text="禁用"
                active-text="启用"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
          </el-form>

          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogVisibless = false">取 消</el-button>
            <el-button
              type="primary"
              @click="(dialogVisibless = false), submitForma('ruleForm')"
            >保 存
            </el-button
            >
          </div>
        </el-dialog>
        <div style="height: 618px; overflow: hidden; overflow-y: scroll">
          <!-- 重症 -->
          <el-collapse
            v-if="listShow"
            :data="arrlist"
            accordion
            style="margin-left: 20px"
          >
            <div v-for="(menu, index) in arrlist" :key="menu.id">
              <span class="size">{{ menu.size }}</span>
              <el-collapse-item :title="menu.scoreType" :name="index">
                <div>
                  <el-table
                    :data="listSubitem"
                    fit
                    highlight-current-row
                    style="width: 100%"
                    :show-header="false"
                  >
                    <el-table-column align="center" min-width="100%">
                      <template scope="scope">
                        <span>{{ scope.row.score_name }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作">
                      <template slot-scope="scope">
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="编辑"
                          placement="bottom-start"
                        >
                          <span class="iconEd"
                          ><i
                            class="el-icon-edit"
                            @click="
                                handleEdit(scope.row), (dialogVisible = true)
                              "
                          /></span>
                        </el-tooltip>

                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="评分项"
                          placement="bottom-start"
                        >
                          <span style="padding: 0 8px 0"
                          ><i
                            class="el-icon-star-off"
                            @click="handleDeleteww(scope.row)"
                          /></span>
                        </el-tooltip>

                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="知识库"
                          placement="bottom-start"
                        >
                          <span
                          ><i
                            class="el-icon-reading"
                            @click="handleDelete_zhishiku(scope.row)"
                          /></span>
                        </el-tooltip>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </el-collapse-item>
            </div>
          </el-collapse>
          <!-- 编辑评分 -->
          <el-dialog title="编辑评分信息" :visible.sync="dialogVisible" width="600px">
            <el-form
              ref="dialogInfo"
              :model="dialogInfo"
              :rules="rules"
              label-width="110px"
            >
              <el-form-item label="评分名称：" prop="score_name">
                <el-input
                  v-model="dialogInfo.score_name"
                  class="el-inputer"
                />
              </el-form-item>

              <el-form-item label="类型：" prop="type">
                <el-input v-model="dialogInfo.type" class="el-inputer"/>
              </el-form-item>

              <el-form-item label="排序：" prop="sort_num">
                <el-input v-model="dialogInfo.sort_num" class="el-inputer1"/>
              </el-form-item>
              <el-form-item label="分类：" prop="score_type">
                <el-select
                  v-model="dialogInfo.score_type"
                  class="el-inputer"
                  placeholder="请选择分类"
                >
                  <el-option label="重症相关" value="重症相关"/>
                  <el-option label="儿科相关" value="儿科相关"/>
                  <el-option label="麻醉相关" value="麻醉相关"/>
                </el-select>
              </el-form-item>
              <el-form-item label="描述：" prop="description">
                <el-input
                  v-model="dialogInfo.description"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="图例：" prop="legend">
                <el-input
                  v-model="dialogInfo.legend"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="评分规则描述：" prop="score_rule">
                <el-input
                  v-model="dialogInfo.score_rule"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="评估时机描述：" prop="score_opportunity">
                <el-input
                  v-model="dialogInfo.score_opportunity"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="录入护理措施：" prop="show_nursing">
                <el-switch
                  v-model="dialogInfo.show_nursing"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item
                label="护理措施："
                prop="nursing_step"
                v-if="dialogInfo.show_nursing"
              >
                <el-input
                  v-model="dialogInfo.nursing_step"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="录入其他措施：" prop="show_other_step">
                <!-- <el-switch v-model="dialogInfo.show_other_step"></el-switch> -->
                <el-switch
                  v-model="dialogInfo.show_other_step"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="录入签名：" prop="show_signature">
                <!-- <el-switch v-model="dialogInfo.show_signature"></el-switch> -->
                <el-switch
                  v-model="dialogInfo.show_signature"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="智能评分：" prop="show_smart_score">
                <!-- <el-switch v-model="dialogInfo.show_smart_score"></el-switch> -->
                <el-switch
                  v-model="dialogInfo.show_smart_score"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="同步护理单：" prop="syn_report">
                <!-- <el-switch v-model="dialogInfo.syn_report"></el-switch> -->
                <el-switch
                  v-model="dialogInfo.syn_report"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="关联护理单：" prop="report_type">
                <el-input
                  v-model="dialogInfo.report_type"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="护理单编码：" prop="report_code">
                <el-input
                  v-model="dialogInfo.report_code"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="同步评估单：" prop="syn_assessment">
                <!-- <el-switch v-model="dialogInfo.syn_assessment"></el-switch> -->
                <el-switch
                  v-model="dialogInfo.syn_assessment"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="关联评估单：" prop="assessment_type">
                <el-input
                  v-model="dialogInfo.assessment_type"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="评估单编码：" prop="assessment_code">
                <el-input
                  v-model="dialogInfo.assessment_code"
                  class="el-inputer"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item
                label="同步至护理记录："
                prop="syn_nursing"
                label-width="110"
              >
                <el-switch
                  v-model="dialogInfo.syn_nursing"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="是否统计：" prop="has_statistics">
                <!-- <el-switch v-model="dialogInfo.has_statistics"></el-switch> -->
                <el-switch
                  v-model="dialogInfo.has_statistics"
                  class="switch-btn"
                  inactive-text="否"
                  active-text="是"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="统计格式日期：" prop="date_type">
                <el-input v-model="dialogInfo.date_type" class="el-inputer"
                >YYYY-MM-DD HH:mm:ss
                </el-input
                >
              </el-form-item>
              <el-form-item label="状态：" prop="status">
                <el-switch
                  v-model="dialogInfo.status"
                  class="switch-btn"
                  inactive-text="禁用"
                  active-text="启用"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
            </el-form>

            <div slot="footer" class="dialog-footer">
              <el-button @click="dialogVisible = false">取 消</el-button>
              <el-button
                type="primary"
                @click="(dialogVisible = false), submitForbianji('dialogInfo')"
              >保 存
              </el-button
              >
            </div>
          </el-dialog>
          <!-- 儿科 -->
          <el-collapse
            v-if="listShower"
            :data="arrlister"
            accordion
            style="margin-left: 20px"
          >
            <div v-for="(menu, index) in arrlister" :key="menu.id">
              <span class="size">{{ menu.size }}</span>
              <el-collapse-item :title="menu.scoreType" :name="index">
                <div>
                  <el-table
                    :data="listSubitemer"
                    fit
                    highlight-current-row
                    style="width: 100%"
                    :show-header="false"
                  >
                    <el-table-column align="center" min-width="100%">
                      <template scope="scope">
                        <span>{{ scope.row.score_name }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作">
                      <template slot-scope="scope">
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="编辑"
                          placement="bottom-start"
                        >
                          <span class="iconEd"
                          ><i
                            class="el-icon-edit"
                            @click="
                                handleEdit(scope.row), (dialogVisible = true)
                              "
                          /></span>
                        </el-tooltip>

                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="评分项"
                          placement="bottom-start"
                        >
                          <span style="padding: 0 8px 0"
                          ><i
                            class="el-icon-star-off"
                            @click="handleDeleteww(scope.row)"
                          /></span>
                        </el-tooltip>
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="知识库"
                          placement="bottom-start"
                        >
                          <span
                          ><i
                            class="el-icon-reading"
                            @click="handleDelete_zhishiku(scope.row)"
                          /></span>
                        </el-tooltip>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </el-collapse-item>
            </div>
          </el-collapse>
          <!-- 麻醉 -->
          <el-collapse
            v-if="listShowma"
            :data="arrlistma"
            accordion
            style="margin-left: 20px"
          >
            <div v-for="(menu, index) in arrlistma" :key="menu.id">
              <span class="size">{{ menu.size }}</span>
              <el-collapse-item :title="menu.scoreType" :name="index">
                <div>
                  <el-table
                    :data="listSubitemma"
                    fit
                    highlight-current-row
                    style="width: 100%"
                    :show-header="false"
                  >
                    <el-table-column align="center" min-width="100%">
                      <template scope="scope">
                        <span>{{ scope.row.score_name }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作">
                      <template slot-scope="scope">
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="编辑"
                          placement="bottom-start"
                        >
                          <span class="iconEd"
                          ><i
                            class="el-icon-edit"
                            @click="
                                handleEdit(scope.row), (dialogVisible = true)
                              "
                          /></span>
                        </el-tooltip>

                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="评分项"
                          placement="bottom-start"
                        >
                          <span style="padding: 0 8px 0"
                          ><i
                            class="el-icon-star-off"
                            @click="handleDeleteww(scope.row)"
                          /></span>
                        </el-tooltip>
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="知识库"
                          placement="bottom-start"
                        >
                          <span
                          ><i
                            class="el-icon-reading"
                            @click="handleDelete_zhishiku(scope.row)"
                          /></span>
                        </el-tooltip>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </el-collapse-item>
            </div>
          </el-collapse>
        </div>
      </div>
      <div class="right">
        <p v-show="fontshow" class="font_right">请先选择左侧的评分</p>
        <!-- ////////////////////////////////////////////评分 -->
        <div v-show="pinfeng" class="right_centent">
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>评分项【{{ this.parent_id.score_name }}】</span>
            </div>
            <!-- 1是项目 -->
            <div v-show="this.radio1 === 1">
              <div class="search-box">
                <el-switch
                  v-model="radio1"
                  active-color="#13ce66"
                  :active-value="lingdu"
                  :inactive-value="wajie"
                  active-text="明细"
                  inactive-text="项目"
                  inactive-color="#409eff"
                  @change="agreeChange($event)"
                />

                <div class="item">
                  <span>名称：</span>
                  <el-input
                    v-model="keshiname"
                    placeholder="请输入名称"
                    clearable
                    style="width: 160px"
                  />
                </div>

                <div class="item">
                  <span>状态：</span>
                  <el-select
                    v-model="value"
                    placeholder="请选择状态"
                    clearable
                    style="width: 160px"
                  >
                    <el-option
                      v-for="item in options"
                      :key="item.id"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
                <div style="margin-left: auto">
                  <el-button
                    type="primary"
                    icon="el-icon-search"
                    @click="rightLisDatas()"
                  >检索</el-button
                  >
                  <el-button
                    icon="el-icon-plus"
                    @click="dialogFormVisible = true"
                  >新增评分项</el-button
                  >
                </div>
              </div>
              <!-- 表格项目 -->
              <div v-show="this.pfx">
                <div>
                  <el-table
                    :data="listdata"
                    style="width: 100%"
                    stripe
                    :header-cell-style="{
                      background: '#d2e0f9',
                      color: '#606266',
                    }"
                  >
                    <el-table-column
                      label="序号"
                      type="index"
                      fixed
                    />
                    <el-table-column label="名称">
                      <template slot-scope="scope">
                        {{ scope.row.score_item_name }}
                      </template>
                    </el-table-column>
                    <el-table-column label="形式">
                      <template slot-scope="scope">
                        {{ scope.row.mode === 0 ? "多选" : "单选" }}
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="状态"
                      property="status"
                      align="center"
                      header-align="center"
                    >
                      <template slot-scope="scope">
                        <el-switch
                          v-model="scope.row.status"
                          class="switch-btn"
                          inactive-text="禁用"
                          active-text="启用"
                          :active-value="1"
                          :inactive-value="0"
                          active-color="#02538C"
                          inactive-color="#B9B9B9"
                          @change="changeSwitchssss(scope.$index, scope.row)"
                        />
                      </template>
                    </el-table-column>
                    <el-table-column label="排列方式">
                      <template slot-scope="scope">
                        {{ scope.row.show_mode === 0 ? "横向" : "纵向" }}
                      </template>
                    </el-table-column>
                    <el-table-column label="隐藏标题">
                      <template slot-scope="scope">
                        {{ scope.row.hide_title === 0 ? "否" : "是" }}
                      </template>
                    </el-table-column>

                    <el-table-column label="排序" prop="sort_num"/>
                    <el-table-column label="操作" fixed="right" width="80">
                      <template slot-scope="scope">
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="编辑"
                          placement="bottom-start"
                        >
                          <span>
                            <i
                              class="el-icon-edit"
                              @click="
                                handleEdit_right(scope.row),
                                  (dialogVisible_right = true)
                              "
                            />
                          </span>
                        </el-tooltip>

                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="明细"
                          placement="bottom-start"
                        >
                          <span style="padding: 0 9px">
                            <i
                              class="el-icon-tickets"
                              @click="handleEdit_right_mingxi(scope.row)"
                            />
                          </span>
                        </el-tooltip>

                        <el-popover
                          :ref="`popover-${scope.$index}`"
                          trigger="click"
                          placement="top"
                          width="100"
                        >
                          <p class="el-icon-warning">确定删除</p>
                          <div style="text-align: right; margin: 0">
                            <el-button
                              size="mini"
                              type="text"
                              @click="no(scope)"
                            >取消</el-button
                            >
                            <el-button
                              type="primary"
                              size="mini"
                              @click="yes(scope)"
                            >确定</el-button
                            >
                          </div>
                          <el-tooltip
                            slot="reference"
                            class="item"
                            effect="dark"
                            content="删除"
                            placement="bottom-start"
                          >
                            <span><i class="el-icon-delete"/></span>
                          </el-tooltip>
                        </el-popover>
                      </template>
                    </el-table-column>
                  </el-table>
                  <div class="paging">
                    <el-pagination
                      :current-page="start"
                      :page-size="PageSize"
                      :pager-count="5"
                      layout="total, sizes, prev, pager, next, jumper"
                      :total="totalCount"
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                    />
                  </div>
                </div>
              </div>

              <!-- 项目中的明细的针对一条 -->
              <div v-show="this.mx">
                <div
                  style="height: 500px; overflow: hidden; overflow-y: scroll"
                >
                  <el-table
                    :data="listdata_mingxi"
                    style="width: 100%"
                    height="370"
                    stripe
                    :header-cell-style="{
                      background: '#d2e0f9',
                      color: '#606266',
                    }"
                  >
                    <el-table-column
                      label="序号"
                      type="index"
                      fixed
                      width="50"
                    />
                    <el-table-column label="名称" width="200">
                      <template slot-scope="scope">
                        {{ scope.row.score_item_name }}
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="状态"
                      property="status"
                      width="160"
                      align="center"
                      header-align="center"
                    >
                      <template slot-scope="scope">
                        <el-switch
                          v-model="scope.row.status"
                          class="switch-btn"
                          inactive-text="禁用"
                          active-text="启用"
                          :active-value="1"
                          :inactive-value="0"
                          active-color="#02538C"
                          inactive-color="#B9B9B9"
                          @change="changeSwitchs(scope.$index, scope.row)"
                        />
                      </template>
                    </el-table-column>
                    <el-table-column label="评分项" width="200">
                      <template slot-scope="scope">
                        {{ scope.row.name }}
                      </template>
                    </el-table-column>

                    <el-table-column label="分数" width="80">
                      <template slot-scope="scope">
                        {{ scope.row.score }}
                      </template>
                    </el-table-column>

                    <el-table-column label="排序" prop="sort_num"/>
                    <el-table-column label="操作" fixed="right" width="80">
                      <template slot-scope="scope">
                        <el-tooltip
                          class="item"
                          effect="dark"
                          content="编辑"
                          placement="bottom-start"
                        >
                          <span class="iconEd"
                          ><i
                            class="el-icon-edit"
                            @click="
                                handleEdit_right(scope.row),
                                  (dialogVisible_right = true)
                              "
                          /></span>
                        </el-tooltip>

                        <el-popover
                          :ref="`popover-${scope.$index}`"
                          trigger="click"
                          placement="top"
                          width="100"
                        >
                          <p class="el-icon-warning">确定删除</p>
                          <div style="text-align: right; margin: 0">
                            <el-button
                              size="mini"
                              type="text"
                              @click="no(scope)"
                            >取消</el-button
                            >
                            <el-button
                              type="primary"
                              size="mini"
                              @click="yes_mingxi(scope)"
                            >确定</el-button
                            >
                          </div>

                          <el-tooltip
                            slot="reference"
                            class="item"
                            effect="dark"
                            content="删除"
                            placement="bottom-start"
                          >
                            <span style="padding-left: 9px"
                            ><i class="el-icon-delete"
                            /></span>
                          </el-tooltip>
                        </el-popover>
                      </template>
                    </el-table-column>
                  </el-table>
                  <div class="paging">
                    <el-pagination
                      :current-page="start"
                      :page-size="PageSize"
                      :pager-count="5"
                      layout="total, sizes, prev, pager, next, jumper"
                      :total="totalCount"
                      @size-change="handleSizeChangemingxi"
                      @current-change="handleCurrentChangemingxi"
                    />
                  </div>
                </div>
              </div>
              <!-- switch 明细-->
              <el-dialog title="状态更新" :visible.sync="dialogUpdatamx" class="mod_box1">
                <span>
                  <i class="el-icon-warning"/>此操作将会改变开关状态,
                  是否继续?</span
                >
                <span slot="footer" class="dialog-footer">
                  <el-button @click="(dialogUpdatamx = false), cancelSwitchmx()"
                  >取 消</el-button
                  >
                  <el-button
                    type="primary"
                    @click="(dialogUpdatamx = false), updataSwitchmx()"
                  >确 定</el-button
                  >
                </span>
              </el-dialog>

              <!-- 右侧评分的编辑 -->
              <el-dialog title="编辑评分项" :visible.sync="dialogVisible_right" width="600px">
                <el-form
                  ref="right_edit"
                  :model="right_edit"
                  :rules="rules"
                  label-width="100px"
                >
                    <el-form-item label="名称：" prop="score_item_name">
                      <el-input
                        v-model="right_edit.score_item_name"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="展现形式：" prop="mode">
                      <el-switch
                        v-model="right_edit.mode"
                        class="switch-btn"
                        inactive-text="单选"
                        active-text="多选"
                        :active-value="0"
                        :inactive-value="1"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                    <el-form-item label="按数量评分：" prop="by_count">
                      <el-switch
                        v-model="right_edit.by_count"
                        class="switch-btn"
                        inactive-text="是"
                        active-text="否"
                        :active-value="0"
                        :inactive-value="1"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                    <el-form-item label="隐藏标题：" prop="hide_title">
                      <el-switch
                        v-model="right_edit.hide_title"
                        class="switch-btn"
                        inactive-text="是"
                        active-text="否"
                        :active-value="0"
                        :inactive-value="1"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                    <el-form-item label="排列方式：" prop="show_mode">
                      <el-switch
                        v-model="right_edit.show_mode"
                        class="switch-btn"
                        inactive-text="纵向"
                        active-text="横向"
                        :active-value="0"
                        :inactive-value="1"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                    <el-form-item label="强制单行：" prop="force_horizon">
                      <el-switch
                        v-model="right_edit.force_horizon"
                        class="switch-btn"
                        inactive-text="是"
                        active-text="否"
                        :active-value="0"
                        :inactive-value="1"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                    <el-form-item
                      label="组间互斥号："
                      prop="group_exclusion_num"
                    >
                      <el-input
                        v-model="right_edit.group_exclusion_num"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="组号：" prop="group_num">
                      <el-input
                        v-model="right_edit.group_num"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="计算分数：" prop="calculate_num">
                      <el-input
                        v-model="right_edit.calculate_num"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="计算规则：" prop="calculate_rule">
                      <el-select
                        v-model="right_edit.calculate_rule"
                        class="el-inputer"
                        placeholder="请选择计算规则："
                      >
                        <el-option label="+" value="+"/>
                        <el-option label="-" value="-"/>
                        <el-option label="*" value="*"/>
                        <el-option label="/" value="/"/>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="排序：" prop="sort_num">
                      <el-input
                        v-model="right_edit.sort_num"
                        class="el-inputer1"
                      />
                    </el-form-item>

                    <el-form-item label="描述：" prop=" description">
                      <el-input
                        v-model="right_edit.description"
                        class="el-inputer"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                      />
                    </el-form-item>
                    <el-form-item label="状态：" prop="status">
                      <el-switch
                        v-model="right_edit.status"
                        class="switch-btn"
                        inactive-text="禁用"
                        active-text="启用"
                        :active-value="1"
                        :inactive-value="0"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                  </el-form>
                <div slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible_right = false"
                  >取 消</el-button
                  >
                  <el-button
                    type="primary"
                    @click="
                      btn_right('right_edit'), (dialogVisible_right = false)
                    "
                  >保 存</el-button
                  >
                </div>
              </el-dialog>
              <!-- switch -->
              <el-dialog
                title="状态更新"
                :visible.sync="dialogUpdata"
                class="mod_box1"
              >
                <span>
                  <i class="el-icon-warning"/>此操作将会改变开关状态,
                  是否继续?</span
                >
                <span slot="footer" class="dialog-footer">
                  <el-button @click="(dialogUpdata = false), cancelSwitch()"
                  >取 消</el-button
                  >
                  <el-button
                    type="primary"
                    @click="(dialogUpdata = false), updataSwitch()"
                  >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div>
            <!-- 0是明细 -->
            <div v-show="this.radio1 === 0">
              <div class="search-box">
                <el-switch
                  v-model="radio1"
                  active-color="#13ce66"
                  :active-value="lingdu"
                  :inactive-value="wajie"
                  inactive-text="项目"
                  active-text="明细"
                  inactive-color="#409eff"
                  @change="agreeChange($event)"
                />

                <div class="item">
                  <span>名称：</span>
                  <el-input
                    v-model="keshiname"
                    clearable
                    placeholder="请输入名称"
                    style="width: 160px"
                  />
                </div>
                <div class="item">
                  <span>评分项：</span>
                  <el-select
                    v-model="xiang"
                    placeholder="请选择"
                    clearable
                    style="width: 160px"
                  >
                    <el-option
                      v-for="item in listdata"
                      :key="item.id"
                      :label="item.score_item_name"
                      :value="item.id"
                    />
                  </el-select>
                </div>

                <div class="item">
                  <span>状态：</span>
                  <el-select
                    v-model="value"
                    placeholder="请选择状态"
                    clearable
                    style="width: 160px"
                  >
                    <el-option
                      v-for="item in options"
                      :key="item.id"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>

                <div style="margin-left: auto">
                  <el-button
                    type="primary"
                    icon="el-icon-search"
                    @click="btn_mingxi"
                  >检索</el-button
                  >
                  <el-button
                    icon="el-icon-plus"
                    @click="(dialogFormVisible_mx = true), dazuiwa()"
                  >新增明细</el-button
                  >
                </div>
              </div>
              <!-- 新增明细 -->
              <el-dialog title="新增明细" :visible.sync="dialogFormVisible_mx" width="600px">
                <el-form
                  ref="quanbu"
                  :model="quanbu"
                  :rules="rules"
                  label-width="110px"
                >
                    <el-form-item label="名称：" prop="score_item_name">
                      <el-input
                        @change="jizaizi($event)"
                        v-model="quanbu.score_item_name"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="评分项：" prop="name">
                      <el-input v-model="quanbu.name" class="el-inputer"/>
                    </el-form-item>
                    <el-form-item label="分数：" prop="score">
                      <el-input v-model="quanbu.score" class="el-inputer"/>
                    </el-form-item>
                    <el-form-item label="条件最小值：" prop="score_item_min">
                      <el-input
                        v-model="quanbu.score_item_min"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="条件最大值：" prop="score_item_max">
                      <el-input
                        v-model="quanbu.score_item_max"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="该项分数倍数：" prop="double_score">
                      <el-input
                        v-model="quanbu.double_score"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item
                      label="组间互斥号："
                      prop="item_group_exclusion_num"
                    >
                      <el-input
                        v-model="quanbu.item_group_exclusion_num"
                        class="el-inputer"
                      />
                    </el-form-item>
                    <el-form-item label="排序：" prop="sort_num">
                      <el-input
                        v-model="quanbu.sort_num"
                        class="el-inputer1"
                      />
                    </el-form-item>
                    <el-form-item label="描述：" prop=" description">
                      <el-input
                        v-model="quanbu.description"
                        class="el-inputer"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                      />
                    </el-form-item>
                    <el-form-item label="状态：" prop="status">
                      <el-switch
                        v-model="quanbu.status"
                        class="switch-btn"
                        inactive-text="禁用"
                        active-text="启用"
                        :active-value="1"
                        :inactive-value="0"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                      />
                    </el-form-item>
                  </el-form>
                <div slot="footer" class="dialog-footer">
                  <el-button @click="dialogFormVisible_mx = false"
                  >取 消</el-button
                  >
                  <el-button
                    type="primary"
                    @click="
                      btn_right_quanbu_mxadd('quanbu', quanbu),
                        (dialogFormVisible_mx = false)
                    "
                  >保 存</el-button
                  >
                </div>
              </el-dialog>
              <!--  -->
              <!-- 全部明细 -->
              <div style="height: 500px; overflow: hidden; overflow-y: scroll">
                <el-table
                  :data="aaa"
                  style="width: 100%"
                  height="370"
                  stripe
                  :header-cell-style="{
                    background: '#d2e0f9',
                    color: '#606266',
                  }"
                >
                  <el-table-column label="序号" type="index" fixed width="50"/>
                  <el-table-column label="名称">
                    <template slot-scope="scope">
                      {{ scope.row.score_item_name }}
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="状态"
                    property="status"
                    align="center"
                    header-align="center"
                  >
                    <template slot-scope="scope">
                      <el-switch
                        v-model="scope.row.status"
                        class="switch-btn"
                        inactive-text="禁用"
                        active-text="启用"
                        :active-value="1"
                        :inactive-value="0"
                        active-color="#02538C"
                        inactive-color="#B9B9B9"
                        @change="changeSwitchsmingxi(scope.$index, scope.row)"
                      />
                    </template>
                  </el-table-column>
                  <el-table-column label="评分项">
                    <template slot-scope="scope">
                      {{ scope.row.name }}
                    </template>
                  </el-table-column>

                  <el-table-column label="分数">
                    <template slot-scope="scope">
                      {{ scope.row.score }}
                    </template>
                  </el-table-column>

                  <el-table-column label="排序" prop="sort_num"/>
                  <el-table-column label="操作" fixed="right" width="80">
                    <template slot-scope="scope">
                      <el-tooltip
                        class="item"
                        effect="dark"
                        content="编辑"
                        placement="bottom-start"
                      >
                        <span class="iconEd"
                        ><i
                          class="el-icon-edit"
                          @click="
                              handleEdit_right_quanbu(scope.row),
                                (dialogVisible_right_quanbu = true)
                            "
                        /></span>
                      </el-tooltip>

                      <el-popover
                        :ref="`popover-${scope.$index}`"
                        trigger="click"
                        placement="top"
                        width="100"
                      >
                        <p class="el-icon-warning">确定删除</p>
                        <div style="text-align: right; margin: 0">
                          <el-button size="mini" type="text" @click="no(scope)"
                          >取消</el-button
                          >
                          <el-button
                            type="primary"
                            size="mini"
                            @click="yes_mingxi_quabbu(scope)"
                          >确定</el-button
                          >
                        </div>
                        <el-tooltip
                          slot="reference"
                          class="item"
                          effect="dark"
                          content="删除"
                          placement="bottom-start"
                        >
                          <span style="padding-left: 9px"
                          ><i class="el-icon-delete"
                          /></span>
                        </el-tooltip>
                        > -->
                      </el-popover>
                    </template>
                  </el-table-column>
                </el-table>
                <div class="paging">
                  <el-pagination
                    :current-page="start"
                    :page-size="PageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :pager-count="5"
                    :total="totalCountss"
                    @size-change="handleSizeChangequanbu"
                    @current-change="handleCurrentChangequanbu"
                  />
                </div>
                <!-- switch 明细-->
                <el-dialog
                  title="状态更新"
                  :visible.sync="dialogUpdatamxall"
                  class="mod_box1"
                >
                  <span>
                    <i class="el-icon-warning"/>此操作将会改变开关状态,
                    是否继续?</span
                  >
                  <span slot="footer" class="dialog-footer">
                    <el-button
                      @click="(dialogUpdatamxall = false), cancelSwitchmxall()"
                    >取 消</el-button
                    >
                    <el-button
                      type="primary"
                      @click="(dialogUpdatamxall = false), updataSwitchmxall()"
                    >确 定</el-button
                    >
                  </span>
                </el-dialog>
                <!-- 全部明细的编辑 -->
                <el-dialog title="编辑明细" :visible.sync="dialogVisible_right_quanbu" width="600px">
                  <el-form
                    ref="quanbu"
                    :model="quanbu"
                    :rules="rules"
                    label-width="110px"
                  >
                      <el-form-item label="名称：" prop="score_item_name">
                        <el-input
                          v-model="quanbu.score_item_name"
                          class="el-inputer"
                        />
                      </el-form-item>
                      <el-form-item label="评分项：" prop="name">
                        <el-input v-model="quanbu.name" class="el-inputer"/>
                      </el-form-item>
                      <el-form-item label="分数：" prop="score">
                        <el-input v-model="quanbu.score" class="el-inputer"/>
                      </el-form-item>
                      <el-form-item label="条件最小值：" prop="score_item_min">
                        <el-input
                          v-model="quanbu.score_item_min"
                          class="el-inputer"
                        />
                      </el-form-item>
                      <el-form-item label="条件最大值：" prop="score_item_max">
                        <el-input
                          v-model="quanbu.score_item_max"
                          class="el-inputer"
                        />
                      </el-form-item>
                      <el-form-item label="该项分数倍数：" prop="double_score">
                        <el-input
                          v-model="quanbu.double_score"
                          class="el-inputer"
                        />
                      </el-form-item>
                      <el-form-item
                        label="组间互斥号："
                        prop="item_group_exclusion_num"
                      >
                        <el-input
                          v-model="quanbu.item_group_exclusion_num"
                          class="el-inputer"
                        />
                      </el-form-item>
                      <el-form-item label="排序：" prop="sort_num">
                        <el-input v-model="quanbu.sort_num" class="el-inputer1"/>
                      </el-form-item>
                      <el-form-item label="描述：" prop=" description">
                        <el-input
                          v-model="quanbu.description"
                          class="el-inputer"
                          type="textarea"
                          :rows="3"
                          placeholder="请输入"
                        />
                      </el-form-item>
                      <el-form-item label="状态：" prop="status">
                        <el-switch
                          v-model="quanbu.status"
                          class="switch-btn"
                          inactive-text="禁用"
                          active-text="启用"
                          :active-value="1"
                          :inactive-value="0"
                          active-color="#02538C"
                          inactive-color="#B9B9B9"
                        />
                      </el-form-item>
                    </el-form>
                  <div slot="footer" class="dialog-footer">
                    <el-button @click="dialogVisible_right_quanbu = false"
                    >取 消</el-button
                    >
                    <el-button
                      type="primary"
                      @click="
                        btn_right_quanbu('quanbu'),
                          (dialogVisible_right_quanbu = false)
                      "
                    >保 存</el-button
                    >
                  </div>
                </el-dialog>
              </div>
              <!-- switch -->
              <el-dialog
                title="状态更新"
                :visible.sync="dialogUpdata"
                class="mod_box1"
              >
                <span>
                  <i class="el-icon-warning"/>此操作将会改变开关状态,
                  是否继续?</span
                >
                <span slot="footer" class="dialog-footer">
                  <el-button @click="(dialogUpdata = false), cancelSwitch()"
                  >取 消</el-button
                  >
                  <el-button
                    type="primary"
                    @click="(dialogUpdata = false), updataSwitch()"
                  >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div>
          </el-card>
          <!-- 右侧新增评分项 -->
          <el-dialog title="新增评分项" :visible.sync="dialogFormVisible" width="600px">
            <el-form
              ref="rule"
              :model="rule"
              :rules="rules"
              label-width="100px"
            >
              <el-form-item label="名称：" prop="score_item_name">
                <el-input v-model="rule.score_item_name" class="el-inputer"/>
              </el-form-item>
              <el-form-item label="展现形式：" prop="mode">
                <el-switch
                  v-model="rule.mode"
                  class="switch-btn"
                  inactive-text="单选"
                  active-text="多选"
                  :active-value="0"
                  :inactive-value="1"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="按数量评分：" prop="by_count">
                <el-switch
                  v-model="rule.by_count"
                  class="switch-btn"
                  inactive-text="是"
                  active-text="否"
                  :active-value="0"
                  :inactive-value="1"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="隐藏标题：" prop="hide_title">
                <el-switch
                  v-model="rule.hide_title"
                  class="switch-btn"
                  inactive-text="是"
                  active-text="否"
                  :active-value="0"
                  :inactive-value="1"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="排列方式：" prop="show_mode">
                <el-switch
                  v-model="rule.show_mode"
                  class="switch-btn"
                  inactive-text="纵向"
                  active-text="横向"
                  :active-value="0"
                  :inactive-value="1"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="强制单行：" prop="force_horizon">
                <el-switch
                  v-model="rule.force_horizon"
                  class="switch-btn"
                  inactive-text="是"
                  active-text="否"
                  :active-value="0"
                  :inactive-value="1"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
              <el-form-item label="组间互斥号：" prop="group_exclusion_num">
                <el-input v-model="rule.group_exclusion_num"/>
              </el-form-item>

              <el-form-item label="组号：" prop="group_num">
                <el-input v-model="rule.group_num"/>
              </el-form-item>
              <el-form-item label="计算分数：" prop="calculate_num">
                <el-input v-model="rule.calculate_num"/>
              </el-form-item>
              <el-form-item label="计算规则：" prop="calculate_rule">
                <el-select
                  v-model="rule.calculate_rule"
                  placeholder="请选择计算规则："
                >
                  <el-option label="+" value="+"/>
                  <el-option label="-" value="-"/>
                  <el-option label="*" value="*"/>
                  <el-option label="/" value="/"/>
                </el-select>
              </el-form-item>
              <el-form-item label="排序：" prop="sort_num">
                <el-input v-model="rule.sort_num" class="el-inputer1"/>
              </el-form-item>

              <el-form-item label="描述：" prop=" description">
                <el-input
                  v-model="rule.description"
                  type="textarea"
                  :rows="3"
                  placeholder="请输入"
                />
              </el-form-item>
              <el-form-item label="状态：" prop="status">
                <el-switch
                  v-model="rule.status"
                  class="switch-btn"
                  inactive-text="禁用"
                  active-text="启用"
                  :active-value="1"
                  :inactive-value="0"
                  active-color="#02538C"
                  inactive-color="#B9B9B9"
                />
              </el-form-item>
            </el-form>

            <div slot="footer" class="dialog-footer">
              <el-button @click="dialogFormVisible = false">取 消</el-button>
              <el-button
                :plain="true"
                type="primary"
                @click="(dialogFormVisible = false), submitFormxinzhen('rule')"
              >保 存
              </el-button
              >
            </div>
          </el-dialog>
        </div>

        <!-- 右侧新增 -->
        <el-dialog title="新增评分项" :visible.sync="dialogFormVisible" width="600px">
          <el-form
            ref="rule"
            :model="rule"
            :rules="rules"
            label-width="100px"
          >
            <el-form-item label="名称：" prop="score_item_name">
              <el-input v-model="rule.score_item_name" class="el-inputer"/>
            </el-form-item>
            <el-form-item label="展现形式：" prop="mode">
              <el-switch
                v-model="rule.mode"
                class="switch-btn"
                inactive-text="单选"
                active-text="多选"
                :active-value="0"
                :inactive-value="1"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="按数量评分：" prop="by_count">
              <el-switch
                v-model="rule.by_count"
                class="switch-btn"
                inactive-text="是"
                active-text="否"
                :active-value="0"
                :inactive-value="1"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="隐藏标题：" prop="hide_title">
              <el-switch
                v-model="rule.hide_title"
                class="switch-btn"
                inactive-text="是"
                active-text="否"
                :active-value="0"
                :inactive-value="1"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="排列方式：" prop="show_mode">
              <el-switch
                v-model="rule.show_mode"
                class="switch-btn"
                inactive-text="纵向"
                active-text="横向"
                :active-value="0"
                :inactive-value="1"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="强制单行：" prop="force_horizon">
              <el-switch
                v-model="rule.force_horizon"
                class="switch-btn"
                inactive-text="是"
                active-text="否"
                :active-value="0"
                :inactive-value="1"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
            <el-form-item label="组间互斥号：" prop="group_exclusion_num">
              <el-input
                v-model="rule.group_exclusion_num"
                class="el-inputer"
              />
            </el-form-item>

            <el-form-item label="组号：" prop="group_num">
              <el-input v-model="rule.group_num" class="el-inputer"/>
            </el-form-item>
            <el-form-item label="计算分数：" prop="calculate_num">
              <el-input v-model="rule.calculate_num" class="el-inputer"/>
            </el-form-item>
            <el-form-item label="计算规则：" prop="calculate_rule">
              <el-select
                v-model="rule.calculate_rule"
                class="el-inputer"
                placeholder="请选择计算规则"
              >
                <el-option label="+" value="+"/>
                <el-option label="-" value="-"/>
                <el-option label="*" value="*"/>
                <el-option label="/" value="/"/>
              </el-select>
            </el-form-item>
            <el-form-item label="排序：" prop="sort_num">
              <el-input v-model="rule.sort_num" class="el-inputer1"/>
            </el-form-item>

            <el-form-item label="描述：" prop=" description">
              <el-input
                v-model="rule.description"
                type="textarea"
                :rows="3"
                placeholder="请输入"
                class="el-inputer"
              />
            </el-form-item>
            <el-form-item label="状态：" prop="status">
              <el-switch
                v-model="rule.status"
                class="switch-btn"
                inactive-text="禁用"
                active-text="启用"
                :active-value="1"
                :inactive-value="0"
                active-color="#02538C"
                inactive-color="#B9B9B9"
              />
            </el-form-item>
          </el-form>

          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible = false">取 消</el-button>
            <el-button
              :plain="true"
              type="primary"
              @click="(dialogFormVisible = false), submitFormxinzhen('rule')"
            >保 存
            </el-button
            >
          </div>
        </el-dialog>

        <!-- ///////////知识库评分 -->
        <div v-show="zhishiku" class="right_centent">
          <el-card class="box-card">
            <p v-show="fontshow" class="font_right">请先选择左侧的评分</p>
            <div slot="header" class="clearfix">
              <span>知识库【{{ this.zhishiid.score_name }}】</span>
            </div>

            <div class="search-box">
              <div class="item">
                <span>名称：</span>
                <el-input
                  v-model="zhishikumingcheng"
                  clearable
                  placeholder="请输入名称"
                  style="width: 160px"
                />
              </div>

              <div class="item">
                <span>状态：</span>
                <el-select
                  v-model="value"
                  placeholder="请选择状态"
                  clearable
                  style="width: 160px"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.id"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </div>

              <div style="margin-left: auto">
                <el-button
                  type="primary"
                  icon="el-icon-search"
                  @click="btn_zhishike"
                >检索
                </el-button
                >
                <el-button
                  icon="el-icon-plus"
                  @click="dialogFormVisible_zhishiku = true"
                >新增知识库
                </el-button>
              </div>
            </div>

            <el-table
              :data="zhishi"
              style="width: 100%"
              stripe
              :header-cell-style="{ background: '#d2e0f9', color: '#606266' }"
            >
              <el-table-column label="序号" type="index" width="60"/>
              <el-table-column label="标题" prop="title"/>

              <el-table-column label="风险等级" prop="level"/>
              <el-table-column
                label="状态"
                align="center"
                header-align="center"
              >
                <template slot-scope="scope">
                  <el-switch
                    v-model="scope.row.status"
                    class="switch-btn"
                    inactive-text="禁用"
                    active-text="启用"
                    :active-value="1"
                    :inactive-value="0"
                    active-color="#02538C"
                    inactive-color="#B9B9B9"
                    @change="changeSwitchszhishi(scope.$index, scope.row)"
                  />
                </template>
              </el-table-column>
              <el-table-column label="得分区间">
                <template slot-scope="props">
                  <span
                  >{{ props.row.score_knowledge_min }}至{{
                      props.row.score_knowledge_max
                    }}分</span
                  >
                </template>
              </el-table-column>

              <el-table-column label="操作">
                <template slot-scope="scope">
                  <el-tooltip
                    class="item"
                    effect="dark"
                    content="编辑"
                    placement="bottom-start"
                  >
                    <span class="iconEd"
                    ><i
                      class="el-icon-edit"
                      @click="
                          handleEdit_right_zsk(scope.row),
                            (dialogVisible_right_zsk = true)
                        "
                    /></span>
                  </el-tooltip>

                  <el-popover
                    :ref="`popover-${scope.$index}`"
                    trigger="click"
                    placement="top"
                    width="100"
                  >
                    <p class="el-icon-warning">确定删除</p>
                    <div style="text-align: right; margin: 0">
                      <el-button size="mini" type="text" @click="no(scope)"
                      >取消
                      </el-button
                      >
                      <el-button
                        type="primary"
                        size="mini"
                        @click="yes_mingxi_zsk(scope)"
                      >确定
                      </el-button
                      >
                    </div>
                    <el-tooltip
                      slot="reference"
                      class="item"
                      effect="dark"
                      content="删除"
                      placement="bottom-start"
                    >
                      <span style="padding-left: 9px"
                      ><i class="el-icon-delete"
                      /></span>
                    </el-tooltip>
                  </el-popover>
                </template>
              </el-table-column>
            </el-table>
            <!-- <div class="paging">
              <el-pagination
                :current-page="start"
                :page-size="PageSize"
                :pager-count="5"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalCount"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
              />
            </div> -->
            <!-- switch -->
            <el-dialog
              title="状态更新"
              :visible.sync="dialogUpdatazhi"
              class="mod_box1"
            >
              <span>
                <i class="el-icon-warning"/>此操作将会改变开关状态,
                是否继续?</span
              >
              <span slot="footer" class="dialog-footer">
                <el-button @click="(dialogUpdatazhi = false), cancelSwitchzhi()"
                >取 消</el-button
                >
                <el-button
                  type="primary"
                  @click="(dialogUpdatazhi = false), updataSwitchzhi()"
                >确 定</el-button
                >
              </span>
            </el-dialog>
            <!-- 知识库新增 -->
            <el-dialog title="新增知识库" :visible.sync="dialogFormVisible_zhishiku" width="600px">
              <el-form
                ref="zsk"
                :model="zsk"
                :rules="rules"
                label-width="120px"
              >
                <el-form-item label="标题：" prop="title">
                  <el-input v-model="zsk.title" class="el-inputer"/>
                </el-form-item>

                <el-form-item label="风险等级：" prop="level">
                  <el-input v-model="zsk.level" class="el-inputer"/>
                </el-form-item>

                <el-form-item label="分数下限(包含)：" prop="score_knowledge_min">
                  <el-input v-model="zsk.score_knowledge_min"/>
                </el-form-item>
                <el-form-item label="分数上限(包含)：" prop="score_knowledge_max">
                  <el-input
                    v-model="zsk.score_knowledge_max"
                  />
                </el-form-item>
                <el-form-item label="内容：" prop="sort_num">
                  <el-input
                    v-model="zsk.description"
                    type="textarea"
                    :rows="3"
                    placeholder="请输入"
                    class="el-inputer"
                  />
                </el-form-item>
                <el-form-item label="状态：" prop="status">
                  <el-switch
                    v-model="zsk.status"
                    class="switch-btn"
                    inactive-text="禁用"
                    active-text="启用"
                    :active-value="1"
                    :inactive-value="0"
                    active-color="#02538C"
                    inactive-color="#B9B9B9"
                  />
                </el-form-item>
              </el-form>

              <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible_zhishiku = false"
                >取 消
                </el-button
                >
                <el-button
                  :plain="true"
                  type="primary"
                  @click="
                    (dialogFormVisible_zhishiku = false),
                      submitFormzhishiku('zsk')
                  "
                >保 存
                </el-button
                >
              </div>
            </el-dialog>
            <!-- 编辑 -->
            <el-dialog title="编辑知识库" :visible.sync="dialogVisible_right_zsk" width="600px">
              <el-form
                ref="zshi"
                :model="zshi"
                :rules="rules"
                label-width="120px"
              >
                <el-form-item label="标题：" prop="title">
                  <el-input v-model="zshi.title" class="el-inputer"/>
                </el-form-item>

                <el-form-item label="风险等级：" prop="level">
                  <el-input v-model="zshi.level" class="el-inputer"/>
                </el-form-item>

                <el-form-item
                  label="分数下限(包含)："
                  prop="score_knowledge_min"
                >
                  <el-input v-model="zshi.score_knowledge_min"/>
                </el-form-item>
                <el-form-item
                  label="分数上限(包含)："
                  prop="score_knowledge_max"
                >
                  <el-input v-model="zshi.score_knowledge_max"/>
                </el-form-item>
                <el-form-item label="内容："  prop="description">
                  <el-input
                    v-model="zshi.description"
                    type="textarea"
                    :rows="3"
                    placeholder="请输入"
                    class="el-inputer"
                  />
                </el-form-item>
                <el-form-item label="状态：" prop="status">
                  <el-switch
                    v-model="zshi.status"
                    class="switch-btn"
                    inactive-text="禁用"
                    active-text="启用"
                    :active-value="1"
                    :inactive-value="0"
                    active-color="#02538C"
                    inactive-color="#B9B9B9"
                  />
                </el-form-item>
              </el-form>

              <div slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible_right_zsk = false"
                >取 消
                </el-button
                >
                <el-button
                  :plain="true"
                  type="primary"
                  @click="
                    (dialogVisible_right_zsk = false), submitFormzshi('zshi')
                  "
                >保 存
                </el-button
                >
              </div>
            </el-dialog>
          </el-card>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {
  scoreDictionarygetList,
  scoreDictionaryinsert,
  scoreDictionaryedit,
  scoreItemDictionaryqueryList,
  scoreItemDictionarydelete,
  scoreItemDictionaryinsertDetail,
  scoreItemDictionaryinsert,
  scoreItemDictionaryedit,
  scoreItemDictionaryquerySonList,
  scoreItemDictionarydeleteDetail,
  scoreItemDictionaryeditDetail,
  scoreKnowledgeQueryList, // 查询知识库列表
  scoreKnowledgeInsert,
  scoreKnowledgeDelete,
  scoreKnowledgeEdit,
  scoreItemDictionaryupdateStatus,
  scoreKnowledgeDictionaryupdate,
} from "@/api/table";

export default {
  data() {
    return {
      dialogUpdata: false, // 开关
      dialogUpdatazhi: false, // 开关-知识库
      dialogUpdatamx: false, // 开关-明细
      dialogUpdatamxall: false, // 开关-明细
      switchId: "",
      switchStatus: "",
      mxswitchId: "",
      mxswitchStatus: "",
      mxallswitchId: "",
      mxallswitchStatus: "",

      dialogFormVisible_zhishiku: false,
      dialogFormVisible_mx: false,
      dialogVisible_right_zsk: false,
      mx: false,
      dialogVisible_right_quanbu: false,
      pfx: true,
      luoxuanzi: true,
      listdata_mingxi: [],
      xiang: "",
      show_mingxi: false,
      pinfeng: false,
      fontshow: true,
      lingdu: 0,
      wajie: 1,
      zhishiku: false,
      dialogFormVisible: false,
      dialogVisible_right: false,
      keshiname: "",
      zhishikumingcheng: "",
      zhuantai: "",
      options: [
        {
          id: "0",
          value: "1",
          label: "启用",
        },
        {
          id: "1",
          value: "0",
          label: "禁用",
        },
      ],
      value: "",
      radio1: 1,
      ruleForm: {
        dialogVisible: false,
        scoreName: "",
        scoreType: "",
        sortNum: "",
        description: "",
        type: "",
        legend: "",
        scoreRule: "",
        scoreOpportunity: "",
        nursingStep: "",
        showNursing: 0,
        showOtherStep: 0,
        showSignature: 0,
        showSmartScore: 0,
        synReport: 0,
        reportType: "",
        reportCode: "",
        synAssessment: 0,
        assessmentType: "",
        assessmentCode: "",
        synNursing: 0,
        hasStatistics: 0,
        status: 0,
        dateType: "YYYY-MM-DD HH:mm:ss",
      },
      rule: {
        score_item_name: "",
        mode: 0,
        by_count: 0,
        hide_title: 0,
        show_mode: 0,
        force_horizon: 0,
        group_exclusion_num: "",
        group_num: "",
        calculate_num: "",
        calculate_rule: "",
        description: "",
        sort_num: "",
        status: 0,
      },
      rules: {
        title: [{required: true, message: "标题不能为空", trigger: "blur"}],
        score_item_name: [
          {required: true, message: "名称不能为空", trigger: "blur"},
        ],
        scoreName: [
          {required: true, message: "评分名称不能为空", trigger: "blur"},
        ],
        scoreType: [
          {required: true, message: "请选择活动区域", trigger: "change"},
        ],
        type: [
          {
            required: true,
            message: "类型不能为空",
            trigger: "blur",
          },
        ],
        sortNum: [{required: true, message: "排序不能为空", trigger: "blur"}],
        sort_num: [
          {required: true, message: "排序不能为空", trigger: "blur"},
        ],
      },
      activeName: "1",
      arrlist: [],
      arrlister: [],
      arrlistma: [],
      arr: [],
      listSubitem: [],
      listSubitemer: [],
      listSubitemma: [],
      listShow: false,
      listShower: false,
      listShowma: false,
      dialogVisible: false,
      dialogVisibless: false,
      dialogInfo: {
        scoreName: "",
        scoreType: "",
        type: [],
        sortNum: "",
        description: "",
        type: "",
        legend: "",
        scoreRule: "",
        scoreOpportunity: "",
        nursingStep: "",
        showNursing: 0,
        showOtherStep: 0,
        showSignature: 0,
        showSmartScore: 0,
        synReport: 0,
        reportType: "",
        reportCode: "",
        synAssessment: 0,
        assessmentType: "",
        assessmentCode: "",
        synNursing: 0,
        hasStatistics: 0,
        status: 0,
        dateType: "YYYY-MM-DD HH:mm:ss",
      },
      listdata: [],
      parent_id: {},
      right_edit: {
        score_item_name: '',
        type: '',
        mode: '',
        by_count: '',
        show_mode: '',
        force_horizon: '',
        group_exclusion_num: '',
        group_num: '',
        calculate_num: '',
        calculate_rule: '',
        sort_num: '',
        description: '',
        status: '',
      },
      mx_id: {},
      start: 1, // 默认显示第几页
      totalCount: 0, // 总条数，根据接口获取数据长度(注意：这里不能为空)
      totalCountss: 0,
      pgeSizes: [10, 20, 30, 40], // 个数选择器（可修改）
      PageSize: 10, // 默认每页显示的条数（可修改）
      aaa: [],
      quanbu: {
        score_item_name: "",
        name: "",
        score: "",
        score_item_min: "",
        score_item_max: "",
        double_score: "",
        item_group_exclusion_num: "",
        sort_num: "",
        description: "",
      },
      zhishiid: {},
      zhishi: [],
      zsk: {
        description: "",
        level: "",
        score_knowledge_min: "",
        score_knowledge_max: "",
        status: "",
        title: "",
      },
      zshi: {
        title: "",
      },
      starts: "",
      PageSizes: "",
      chanwa: "",
    };
  },
  created() {
  },
  mounted() {
    this.Start();
    // this.Starter();
    this.Startma();
    this.mingxi_xin(this.PageSize, this.start);
  },
  methods: {
    // 新增确认
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          alert("submit!");
        } else {
          return false;
        }
      });
    },
    submitForma(ruleForm) {
      this.$refs[ruleForm].validate((valid) => {
        if (valid) {
          scoreDictionaryinsert(this.ruleForm).then((res) => {
            this.Start();
            // this.Starter();
            this.Startma();
          });
        } else {
          this.$message({
            message: "请填写必填项！",
            type: "warning",
            duration: 1500,
          });
          this.dialogVisibless = true;
          return false;
        }
      });
    },
    details_list(a, b) {
    },
    handleEdit(info) {
      // 弹窗打开
      // this.dialogVisible = true;
      this.dialogInfo = info;
    },
    handleEdit_right(info) {
      this.right_edit = info;
    },
    handleEdit_right_quanbu(info) {
      this.quanbu = info;
    },
    handleEdit_right_mingxi(info) {
      this.luoxuanzi = false;
      this.pfx = false;
      this.mx = true;
      this.mx_id = info;
      this.radio1 = this.lingdu;
      this.mingxi_xin(this.PageSize, this.start);
    },
    handleEdit_right_zsk(info) {
      this.zshi = info;
    },
    // ///////////////////////////////////////////
    btn_right(right_edit) {
      this.$refs[right_edit].validate((valid) => {
        if (valid) {
          scoreItemDictionaryedit({
            id: this.right_edit.id,
            scoreItemName: this.right_edit.score_item_name,
            type: this.right_edit.type,
            mode: this.right_edit.mode,
            byCount: this.right_edit.by_count,
            hideTitle: this.right_edit.hide_title,
            showMode: this.right_edit.show_mode,
            forceHorizon: this.right_edit.force_horizon,
            groupExclusionNum: this.right_edit.group_exclusion_num,
            groupNum: this.right_edit.group_num,
            calculateNum: this.right_edit.calculate_num,
            calculateRule: this.right_edit.calculate_rule,
            sortNum: Number(this.right_edit.sort_num),
            description: this.right_edit.description,
            status: this.right_edit.status
          }).then((res) => {
            this.$message({message: res.msg, type: "info"});

            this.btn_zhishike();
          });
        } else {
          this.$message({message: "请填写必填项！", type: "warning"});

          this.dialogVisible_right = true;
          return false;
        }
      });
    },
    // 编辑全部
    btn_right_quanbu(quanbu) {
      this.$refs[quanbu].validate((valid) => {
        if (valid) {
          scoreItemDictionaryeditDetail({
            id: this.quanbu.id,
            parentId: this.quanbu.parent_id,
            scoreItemName: this.quanbu.score_item_name,
            score: Number(this.quanbu.score),
            scoreItemMin: this.quanbu.score_item_min,
            scoreItemMax: this.quanbu.score_item_max,
            description: this.quanbu.description,
            sortNum: Number(this.quanbu.sort_num),
            status: this.quanbu.status,
            itemGroupExclusionNum: this.quanbu.item_group_exclusion_num,
            doubleScore: Number(this.quanbu.double_score),
          }).then((res) => {
            this.$message({message: res.msg, type: "info"});

            this.btn_mingxi();
          });
        } else {
          this.$message({message: "请填写必填项！", type: "warning"});
          this.dialogVisible_right_quanbu = true;
          return false;
        }
      });
    },
    dazuiwa() {
      this.quanbu.score_item_name = "";
      this.quanbu.name = "";
      this.quanbu.score = "";
      this.quanbu.score_item_min = "";
      this.quanbu.score_item_max = "";
      this.quanbu.double_score = "";
      this.quanbu.item_group_exclusion_num = "";
      this.quanbu.sort_num = "";
      this.quanbu.description = "";
      this.quanbu.status = "";
    },
    jizaizi(event) {
      this.chanwa = event;
    },
    // 新增明细
    btn_right_quanbu_mxadd(quanbu, twole) {
      console.log(quanbu, "ddd");
      this.quanbu.score_item_name = this.chanwa;
      this.$refs[quanbu].validate((valid) => {
        if (valid) {
          scoreItemDictionaryinsertDetail({
            id: this.quanbu.id,
            parentId: this.mx_id.id,
            scoreItemName: this.chanwa,
            score: Number(this.quanbu.score),
            scoreItemMin: this.quanbu.score_item_min,
            scoreItemMax: this.quanbu.score_item_max,
            description: this.quanbu.description,
            sortNum: this.quanbu.sort_num,
            status: this.quanbu.status,
            itemGroupExclusionNum: this.quanbu.item_group_exclusion_num,
            doubleScore: Number(this.quanbu.double_score),
            type: this.parent_id.type,
            // scoreItemName: twole.name,
          }).then((res) => {
            this.scoreItemDictionaryquerySonList(this.PageSize, this.start);
          });
        } else {
          this.$message({
            message: "请填写必填项！",
            type: "warning",
            duration: 1500,
          });
          this.dialogFormVisible_mx = true;
          return false;
        }
      });
    },
    // 编辑
    submitForbianji() {
      scoreDictionaryedit({
        id: this.dialogInfo.id,
        scoreName: this.dialogInfo.score_name,
        type: this.dialogInfo.type,
        scoreType: this.dialogInfo.score_type,
        sortNum: this.dialogInfo.sort_num,
        description: this.dialogInfo.description,
        legend: this.dialogInfo.legend,
        scoreRule: this.dialogInfo.score_rule,
        scoreOpportunity: this.dialogInfo.score_opportunity,
        showNursing: this.dialogInfo.show_nursing,
        showOtherStep: this.dialogInfo.show_other_step,
        showSignature: this.dialogInfo.show_signature,
        showSmartScore: this.dialogInfo.show_smart_score,
        synReport: this.dialogInfo.syn_report,
        reportType: this.dialogInfo.report_type,
        reportCode: this.dialogInfo.report_code,
        synAssessment: this.dialogInfo.syn_assessment,
        assessmentType: this.dialogInfo.assessment_type,
        assessmentCode: this.dialogInfo.assessment_code,
        synNursing: this.dialogInfo.syn_nursing,
        hasStatistics: this.dialogInfo.has_statistics,
        nursingStep: this.dialogInfo.nursing_step,
        dateType: this.dialogInfo.date_type,
        status: this.dialogInfo.status,
      }).then((res) => {
        this.Start();
      });
    },
    handleDelete(index, row) {
    },

    // 左侧删除
    yes(scope) {
      // 可以在这里执行删除数据的回调操作.......删除操作......
      const id = scope.row.id;
      scoreItemDictionarydelete({id: id}).then((res) => {
        this.$message({
          message: "删除成功",
          type: "success",
        });
        this.rightLisData(this.PageSize, this.start);
      });
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    // 明细删除
    yes_mingxi(scope) {
      // 可以在这里执行删除数据的回调操作.......删除操作......
      const id = scope.row.id;
      scoreItemDictionarydeleteDetail({id: id}).then((res) => {
        this.$message({
          message: "删除成功",
          type: "success",
        });
        this.mingxi_ming(this.PageSize, this.start);
      });
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    no(scope) {
      this.$message("取消删除");
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    // 全部明细删除
    yes_mingxi_quabbu(scope) {
      // 可以在这里执行删除数据的回调操作.......删除操作......
      const id = scope.row.id;
      scoreItemDictionarydeleteDetail({id: id}).then((res) => {
        this.$message({
          message: "删除成功",
          type: "success",
        });
        this.scoreItemDictionaryquerySonList(this.PageSize, this.start);
      });
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    no(scope) {
      this.$message("取消删除");
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    // 删除知识库
    yes_mingxi_zsk(scope) {
      // 可以在这里执行删除数据的回调操作.......删除操作......
      const id = scope.row.id;
      scoreKnowledgeDelete({id: id}).then((res) => {
        this.$message({
          message: "删除成功",
          type: "success",
        });
        this.zhishikuData();
      });
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },
    no(scope) {
      this.$message("取消删除");
      scope._self.$refs[`popover-${scope.$index}`].doClose();
    },

    // 点击评分
    async handleDeleteww(info, n1, n2) {
      this.radio1 = 1;
      this.pinfeng = true;
      this.pfx = true;
      this.mx = false;
      this.fontshow = false;
      this.zhishiku = false;
      this.parent_id = info;
      this.start = 1;
      await this.rightLisData(this.PageSize, this.start);
      // this.btn_zhishike(this.PageSize, this.start);
    },
    // 点击知识库
    async handleDelete_zhishiku(info) {
      this.fontshow = false;
      this.pinfeng = false;
      this.zhishiku = true; // /////////////////////////////////////////////////////////////////
      this.zhishiid = info;
      await this.zhishikuData(this.PageSize, this.start);
    },
    // 知识库查询
    btn_zhishike() {
      scoreKnowledgeQueryList({
        status: this.value === "" ? null : Number(this.value),
        size: this.PageSize,
        start: 1,
        title: this.zhishikumingcheng,
        type: this.zhishiid.type,
      }).then((res) => {
        this.zhishi = res.data;
        this.totalCount = res.totalCount;
      });
    },
    Start() {
      scoreDictionarygetList({scoreType: "重症相关"}).then((res) => {
        this.arrlist = res.data;
        this.listSubitem = res.data[0].list;
        this.listShow = true;
      });
    },
    // Starter() {
    //   scoreDictionarygetList({ scoreType: "儿科相关" }).then((res) => {
    //     this.arrlister = res.data;
    //     this.listSubitemer = res.data[0].list;
    //     this.listShower = true;
    //   });
    // },
    Startma() {
      scoreDictionarygetList({scoreType: "麻醉相关"}).then((res) => {
        this.arrlistma = res.data;
        // this.listSubitemma = res.data[0].list
        this.listShowma = true;
      });
    },

    // 评分开关
    agreeChange(value) {
      if (value == this.wajie) {
        this.pfx = true;
        this.mx = false;
        this.start = 1;
        this.rightLisData_xin(this.PageSize, this.start);
        this.luoxuanzi = true;
      } else {
        this.start = 1;
        this.mingxi_xins();
      }
    },
    // 搜索按钮
    btn() {
      scoreItemDictionaryqueryList({
        status: this.value === "" ? null : Number(this.value),
        size: this.PageSize,
        start: this.start,
        scoreItemName: this.keshiname,
      }).then((res) => {
        this.listdata = res.data;

        this.totalCount = res.totalCount;
      });
    },
    // 明细的检索按钮
    btn_mingxi() {
      this.start = 1;
      scoreItemDictionaryquerySonList({
        status: this.value === "" ? null : Number(this.value),
        scoreItemName: this.keshiname,
        size: this.PageSize,
        start: this.start,
        type: this.parent_id.type,
        parentId: this.xiang,
      }).then((res) => {
        this.aaa = res.data;
        this.totalCounts = res.totalCount;
      });
    },
    mingxi_xins() {
      scoreItemDictionaryquerySonList({
        status: this.value === "" ? null : Number(this.value),
        scoreItemName: this.keshiname,
        size: this.PageSize,
        start: this.start,
        type: this.parent_id.type,
        parentId: this.xiang,
      }).then((res) => {
        this.totalCountss = res.totalCount;
        this.aaa = res.data;
      });
    },
    // 新增模板
    submitFormxinzhen(rule) {
      this.$refs[rule].validate((valid) => {
        if (valid) {
          scoreItemDictionaryinsert({
            type: this.parent_id.type,
            scoreItemName: this.rule.score_item_name,
            mode: this.rule.mode,
            byCount: this.rule.by_count,
            hideTitle: this.rule.hide_title,
            showMode: this.rule.show_mode,
            forceHorizon: this.rule.force_horizon,
            groupExclusionNum: this.rule.group_exclusion_num,
            groupNum: this.rule.group_num,
            calculateNum: Number(this.rule.calculate_num),
            calculateRule: this.rule.calculate_rule,
            sortNum: Number(this.rule.sort_num),
            description: this.rule.description,
            status: this.rule.status,
          }).then((res) => {
            this.rightLisData(this.PageSize, this.start);
          });
        } else {
          this.$message({
            message: "请填写必填项！",
            type: "warning",
            duration: 1500,
          });
          this.dialogFormVisible = true;
          return false;
        }
      });
    },
    // 编辑知识库
    submitFormzshi(zshi) {
      this.$refs[zshi].validate((valid) => {
        if (valid) {
          scoreKnowledgeEdit({
            id: this.zshi.id,
            type: this.zhishiid.type,
            title: this.zshi.title,
            level: this.zshi.level,
            scoreKnowledgeMin: Number(this.zshi.score_knowledge_min),
            scoreKnowledgeMax: Number(this.zshi.score_knowledge_max),
            description: this.zshi.description,
            status: this.zshi.status,
          }).then((res) => {
            this.zhishikuData();
          });
        } else {
          this.$message({
            message: "标题不能为空！",
            type: "warning",
            duration: 1500,
          });
          this.dialogVisible_right_zsk = true;
          return false;
        }
      });
    },
    // 新增知识库
    submitFormzhishiku(zsk) {
      this.$refs[zsk].validate((valid) => {
        if (valid) {
          scoreKnowledgeInsert({
            type: this.zhishiid.type,
            title: this.zsk.title,
            level: this.zsk.level,
            scoreKnowledgeMin: Number(this.zsk.score_knowledge_min),
            scoreKnowledgeMax: Number(this.zsk.score_knowledge_max),
            description: this.zsk.description,
            status: this.zsk.status,
          }).then((res) => {
            this.zhishikuData();
          });
        } else {
          this.$message({
            message: "请填写必填项！",
            type: "warning",
            duration: 1500,
          });
          this.dialogFormVisible_zhishiku = true;
          return false;
        }
      });
    },
    // 右侧列表
    rightLisData(n1, n2) {
      scoreItemDictionaryqueryList({
        type: this.parent_id.type,
        size: n1,
        start: n2,
      }).then((res) => {
        this.listdata = res.data;
        this.totalCount = res.totalCount;
      });
    },
    rightLisDatas() {
      this.start = 1;
      scoreItemDictionaryqueryList({
        type: this.parent_id.type,
        size: this.PageSize,
        start: this.start,
      }).then((res) => {
        this.listdata = res.data;
        this.totalCount = res.totalCount;
      });
    },
    rightLisData_xin(n1, n2) {
      scoreItemDictionaryqueryList({
        type: this.parent_id.type,
        size: n1,
        start: n2,
      }).then((res) => {
        this.listdata = res.data;
        this.totalCount = res.totalCount;
      });
    },
    // zhishiku
    zhishikuData(n1, n2) {
      scoreKnowledgeQueryList({
        type: this.zhishiid.type,
        size: n1,
        start: n2,
      }).then((res) => {
        this.zhishi = res.data;
        this.totalCount = res.totalCount;
      });
    },
    // 明细列表
    mingxi_ming(n1, n2) {
      scoreItemDictionaryquerySonList({
        parentId: this.mx_id.id,
        type: this.mx_id.type,
        size: n1,
        start: n2,
      }).then((res) => {
        this.listdata_mingxi = res.data;
        this.totalCounts = res.totalCount;
      });
    },
    // 明细全部
    scoreItemDictionaryquerySonList(n1, n2) {
      scoreItemDictionaryquerySonList({
        status: this.value === "" ? null : Number(this.value),
        scoreItemName: this.keshiname,
        size: n1,
        start: n2,
        type: this.parent_id.type,
        parentId: this.xiang,
      }).then((res) => {
        this.totalCountss = res.totalCount;
        this.aaa = res.data;
      });
    },
    scoreItemDictionaryquerySonListg(n1, n2) {
      scoreItemDictionaryquerySonList({
        status: this.value === "" ? null : Number(this.value),
        scoreItemName: this.keshiname,
        size: n1,
        start: n2,
        type: this.parent_id.type,
        parentId: this.mx_id.id,
      }).then((res) => {
        this.totalCountss = res.totalCount;
        this.aaa = res.data;
      });
    },
    // 明细全部
    mingxi_xin(n1, n2) {
      scoreItemDictionaryquerySonList({
        parentId: this.mx_id.id,
        type: this.mx_id.type,
        size: n1,
        start: n2,
      }).then((res) => {
        this.totalCountss = res.totalCount;
        this.aaa = res.data;
      });
    },

    // 每页显示的条数
    handleSizeChange(val) {
      this.PageSize = val;
      this.rightLisData(val, 1);
      this.start = 1;
    },
    // 显示第几页
    handleCurrentChange(val) {
      this.start = val;
      this.rightLisData(this.PageSize, this.start);
    },
    // 每页显示的条数
    handleSizeChangequanbu(val) {
      this.PageSize = val;
      this.scoreItemDictionaryquerySonList(val, 1);
      this.start = 1;
    },
    // 显示第几页
    handleCurrentChangequanbu(val) {
      console.log('🗡二十酒')
      this.start = val;
      if (this.luoxuanzi == false) {
        this.scoreItemDictionaryquerySonListg(this.PageSize, this.start);
      } else {
        this.scoreItemDictionaryquerySonList(this.PageSize, this.start);
      }

    },
    // //////////明细
    // 每页显示的条数
    handleSizeChangemingxi(val) {
      this.PageSize = val;
      this.mingxi_ming(val, 1);
      this.start = 1;
    },
    // 显示第几页
    handleCurrentChangemingxi(val) {
      this.start = val;
      this.mingxi_ming(this.PageSize, this.start);
    },

    // 列表开关的id
    changeSwitchssss(index, row) {
      this.switchId = row.id;
      this.switchStatus = row.status;
      this.dialogUpdata = true;
    },

    // 明细全部
    changeSwitchsmingxi(index, row) {
      this.mxallswitchId = row.id;
      this.mxallswitchStatus = row.status;
      console.log(this.mxallswitchStatus);
      this.dialogUpdatamxall = true;
    },

    // 查看明细
    changeSwitchs(index, row) {
      this.mxswitchId = row.id;
      this.mxswitchStatus = row.status;
      this.dialogUpdatamx = true;
    },

    // 知识库
    changeSwitchszhishi(index, row) {
      this.switchId = row.id;
      this.switchStatus = row.status;
      this.dialogUpdatazhi = true;
    },

    // 保存开关状态-确认
    updataSwitch() {
      scoreItemDictionaryupdateStatus({
        id: this.switchId,
        status: this.switchStatus,
      }).then((res) => {
        this.rightLisData(this.PageSize, this.start);
      });
    },
    // 保存开关状态-取消
    cancelSwitch() {
      this.rightLisData(this.PageSize, this.start); // 重新获取表格
    },

    // 保存开关状态-查看明细确认
    updataSwitchmx() {
      scoreItemDictionaryupdateStatus({
        id: this.mxswitchId,
        status: this.mxswitchStatus,
      }).then((res) => {
        this.mingxi_ming(this.PageSize, this.start);
      });
    },
    // 保存开关状态-查看明细取消
    cancelSwitchmx() {
      this.mingxi_ming(this.PageSize, this.start); // 重新获取表格
    },

    // 保存开关状态-明细全部确认
    updataSwitchmxall() {
      scoreItemDictionaryupdateStatus({
        id: this.mxallswitchId,
        status: this.mxallswitchStatus,
      }).then((res) => {
        this.scoreItemDictionaryquerySonList(this.PageSize, this.start);
      });
    },
    // 保存开关状态-明细全部取消
    cancelSwitchmxall() {
      this.scoreItemDictionaryquerySonList(this.PageSize, this.start); // 重新获取表格
    },

    // 保存开关状态-知识库确认
    updataSwitchzhi() {
      scoreKnowledgeDictionaryupdate({
        id: this.switchId,
        status: this.switchStatus,
      }).then((res) => {
        this.zhishikuData();
      });
    },
    // 保存开关状态-知识库取消
    cancelSwitchzhi() {
      this.zhishikuData();
    },
  },
};
</script>
<style lang="scss" scoped>
.warp_box {
  width: 100%;
  height: 100%;

  .left {
    width: 23%;
    background: #fff;
    float: left;

    .header {
      width: 100%;
      height: 60px;
      border-bottom: 1px solid #ccc;
      background: #fff;

      .list {
        font-size: 18px;
        line-height: 60px;
        width: auto;
        float: left;
        margin-left: 15px;
      }

      .jia {
        float: left;
        margin-top: -36px;
        margin-left: 350px;
      }
    }

    .size {
      width: 100%;
      display: block;
      float: left;
      height: 0;
      margin-left: 65px;
      line-height: 51px;
    }

    .iconEd {
      margin-left: 34%;
    }
  }

  .right {
    width: 75%;
    background: #fff;
    margin-left: 2%;
    float: left;

    .font_right {
      font-size: 25px;
      font-weight: bold;
      text-align: center;
      line-height: 400px;
      color: rgb(197, 200, 206);
    }

    .right_centent {
      width: 100%;
      background: #fff;
      float: left;
    }
  }
}
.search-box{
  display: flex;
  align-items: baseline;
  margin-bottom: 20px;
  .item{
    margin-left: 20px;
  }
}
</style>
